<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成功提示</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f8ff;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .success-container {
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 400px;
            width: 100%;
        }
        .success-icon {
            font-size: 48px;
            color: #4caf50;
            margin-bottom: 20px;
        }
        .success-message {
            font-size: 24px;
            color: #333;
            margin-bottom: 20px;
        }
        .success-details {
            font-size: 16px;
            color: #666;
        }
        .success-button {
            background-color: #4caf50;
            color: white;
            border: none;
            padding: 10px 20px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin-top: 20px;
            cursor: pointer;
            border-radius: 4px;
        }
        .success-button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<div class="success-container">
    <div class="success-icon">✔</div>
    <div class="success-message">{$msg}！</div>
    <div class="success-details">您的请求已成功处理，3秒后自动返回<a href="{$url}">点击直接返回</a>。</div>
    <!-- 移除之前的按钮，因为我们现在使用自动跳转 -->
</div>

<script>
    // 设置倒计时（3秒）
    var countdown = 3;

    // 显示倒计时
    var countdownElement = document.createElement('div');
    countdownElement.style.fontSize = '16px';
    countdownElement.style.color = '#666';
    countdownElement.style.marginTop = '20px';
    countdownElement.textContent = '倒计时: ' + countdown + ' 秒';
    document.querySelector('.success-container').appendChild(countdownElement);

    // 每秒更新倒计时
    var countdownInterval = setInterval(function() {
        countdown--;
        countdownElement.textContent = '倒计时: ' + countdown + ' 秒';

        // 当倒计时结束时，跳转到首页
        if (countdown <= 0) {
            clearInterval(countdownInterval); // 清除倒计时间隔
            window.location.href = '{$url}'; // 跳转到首页
        }
    }, 1000);
</script>
</body>
</html>